<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>08划入画出动画</title>
</head>
    <style>
        div {
            width: 400px;
            height: 400px;
            background-color: pink;
            display: none;
        }
    </style>
<body>
    
    <input type="button" value="显示">
    <input type="button" value="隐藏">
    <input type="button" value="切换">

    <div></div>

    <script src="../jquery-3.2.1.js"></script>
    <script>
    
        $(function(){
            $("input").eq(0).click(function(){
                $("div").slideDown();
            });
            $("input").eq(1).click(function(){
                $("div").slideUp();
            });
            $("input").eq(2).click(function(){
                $("div").slideToggle();
            })
        })
    
    </script>
</body>
</html>